package com.fanqiechaodan.flyweight;

/**
 * @author fanqiechaodan
 * @Classname ContrectProduct
 * @Description 具体享元;产品类
 */
public class ConcreteProduct implements Product{

    private String name;
    private double price;
    private int stock;

    public ConcreteProduct(String name, double price, int stock) {
        this.name = name;
        this.price = price;
        this.stock = stock;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public double getPrice() {
        return price;
    }

    @Override
    public int getStock() {
        return stock;
    }
}
